﻿//日常财务 ../Stock/GetProductStock?orgCode=' + orgCode

var ProjectTypeDate = [{ ProjectType: 0, text: '收入' }, { ProjectType: 1, text: '支出'}];

var columns =
            [
                  { display: 'Key', name: 'ID', type: 'text', hide: 1 },
                  { display: 'RefeID', name: 'RefeID', type: 'text', hide: 1 },
                  { display: 'ProjectType', name: 'ProjectType', type: 'text', hide: 1 },
                  { display: '项目名称', name: 'RefeName', mintWidth: 80, width: 120, isSort: false},
                  { display: '项目类别', name: 'ProjectTypeName', mintWidth: 100, width: 140 },
                  {name: 'OperatorName', display: '经办人', width: 120, align: 'left'},
                  { display: '经办时间', name: 'HandlingTime', mintWidth: 180, width: 180, type: 'selfDate' },
                  { display: '产生费用(元)', name: 'GenerateFee', mintWidth: 80, width: 140  },
                { display: '备注', name: 'Remark', mintWidth: 80, width: 140 }
             ];

//init controls
$(document).ready(function () {
    initligerGrid();
    
});
var manager = null;
function initligerGrid() {

    var wh = $(window).height();
    var fh = $("#formDiv").height();
    var gridHeight = wh - fh - 50;


    manager = $("#BillItemsGrid").ligerGrid({
        columns: columns,
      //  title: '产品发货细',//不能要标题，修改的BUG，不在ligerui.min.js文件中，所以这个BUG还是存在
        showTitle: false,
        width: '100%',
        enabledSort: true,
        enabledEdit: true,
       // height: gridHeight,
        checkbox: false,
        rownumbers: true,
         url: "../UsualFinance/GetJsonOfBillDetails?billId=" + $("#Id").val() + "&rand=" + Math.random()
     });
}
